<!doctype html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title><g:layoutTitle default="Save the Children" /></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<g:javascript library="jquery" plugin="jquery" />
<link rel="shortcut icon"
	href="${resource(dir: 'images', file: 'favicon.ico')}"
	type="image/x-icon">
<link rel="apple-touch-icon"
	href="${resource(dir: 'images', file: 'apple-touch-icon.png')}">
<link rel="apple-touch-icon" sizes="114x114"
	href="${resource(dir: 'images', file: 'apple-touch-icon-retina.png')}">
<link rel="stylesheet" href="${resource(dir: 'css', file: 'main.css')}"
	type="text/css">
<link rel="stylesheet"
	href="${resource(dir: 'css', file: 'mobile.css')}" type="text/css">
<script type="text/javascript" src="/Fleet_Management/js/jquery.min.js"></script>
<g:layoutHead />
<r:layoutResources />
</head>
<body>
	<div id="grailsLogo">

		<a href="#"><img
			src="${resource(dir: 'images', file: 'save.png')}" alt="Grails" /></a>
		<h1>Welcome to Fleet Management</h1>
		<g:if test="${session.user}">
			<div
				style="width: 100%; height: 20px; float: right; margin: -55px 20px 0 0;">

				<div style="text-align: right; margin: 10px; color: white;">
					Login as:
					${session.user}
					|
					<g:link controller="user" action="logout" style="color:white;">Log-Out</g:link>
				</div>
			</div>
	</div>

	<script type="text/javascript">
		$(document).ready(function() {
			$(".slidingDiv").hide();
			$(".show_hide").show();

			$('.show_hide').click(function() {
				$(".slidingDiv").slideToggle();
			});
		});
	</script>


	<g:if
		test="${session.getAttribute('adminRole').equals('Master Admin')}">
		<div class="menu">
			<ul>

				<li><g:link controller="admin">Admin Management</g:link></li>
				<li><g:link controller="vehicleDatabase">Vehicle Database</g:link></li>
				<li><g:link controller="driverDetails">Driver Details</g:link></li>
				<li><g:link controller="fuelConsumption">Fuel Consumption</g:link></li>
				<li><g:link controller="maintenance">Maintenance/Servicing</g:link></li>
				<br>
				<br>
			</ul>
			<ul>

				<li><g:link controller="vehicleOnDuty">Vehicle On Duty</g:link></li>
				<li><g:link controller="vehicleServicing">Insurance</g:link></li>
				<li><g:link controller="auction">Auction Management</g:link></li>
				<li><g:link controller="monthlyReport" action="create">Generate Report</g:link>
					<ul>
						<li><a href="#">Monthly Report</a></li>
						<li><a href="#">Insurance Report</a></li>
						<li><a href="#">Maintenance/Servicing</a></li>
						<li><a href="#">Register Report</a></li>
					</ul>
				</li>
				<li><a href="#" class="show_hide">Pop Up Message</a></li>
			</ul>
		</div>
	</g:if>
	<g:else test="${session.setAttribute(adminRole)}">
		<div class="menu1">
			<ul>

				<li><g:link controller="vehicleDatabase">Vehicle Database</g:link></li>
				<li><g:link controller="driverDetails">Driver Details</g:link></li>
				<li><g:link controller="fuelConsumption">Fuel Consumption</g:link></li>
				<li><g:link controller="maintenance">Maintenance/Servicing</g:link></li>
				<li><g:link controller="vehicleOnDuty">Vehicle On Duty</g:link></li>
				<br>
				<br>
			</ul>
			<ul style="margin-left: 100px;">
				<li><g:link controller="vehicleServicing">Insurance</g:link></li>
				<li><g:link controller="auction">Auction Management</g:link></li>
				<li><g:link controller="monthlyReport" action="create">Generate Report</g:link>
					<ul>
						<li><a href="#">Monthly Report</a></li>
						<li><a href="#">Insurance Report</a></li>
						<li><a href="#">Maintenance/Servicing</a></li>
						<li><a href="#">Register Report</a></li>
					</ul>
				</li>
				<li><a href="#" class="show_hide">Pop Up Message</a></li>
			</ul>
		</div>
	</g:else>


	<div class="slidingDiv">
		<g:if test="${flash.renewMessage}">
			<div class="message" style="">
				${flash.renewMessage}
			</div>
		</g:if>
		<g:if test="${flash.renewMessage2}">
			<div class="message" style="">
				${flash.renewMessage2}
			</div>
		</g:if>
		<g:if test="${flash.renewMessage3}">
			<div class="message" style="">
				${flash.renewMessage3}
			</div>
		</g:if>
	</div>


	</g:if>
	<g:layoutBody />
	<div class="footer" role="contentinfo"></div>
	<div id="spinner" class="spinner" style="display: none;">
		<g:message code="spinner.alt" default="Loading&hellip;" />
	</div>
	<g:javascript library="application" />
	<r:layoutResources />
</body>
</html>